<?php

	/**
	 * description
	 * detail description
	 * @todo
	 * @author swingcoder <swingcoder@msn.com>
	 * @version 0.1
	 * @copyright Copyright (c) 2009, swingcoder.com
	 */

	class get_item_list
	{
		/**
		 * description
		 * detail description
		 * @param string user
		 * @param integer id
		 * @return int|string|array|object|mixed
		 */
		function run( $argument )
		{
			$argument['size'] = isset( $argument['pagesize'] ) ? $argument['pagesize'] : 12;
			$argument['audit_flag'] = 1;

			if ( isset( $argument['include_subcate'] ) && $argument['include_subcate'] == 1 )
			{
				$cateobj = load( 'biz.cate' );
				$cateid = $cateobj->getcatealllist( $argument['cate_id'], true );
				$cateid_list = '';
				foreach ( $cateid as $index => $value )
				{
					$cateid_list .=  $value['id'] . ',';
				}
				$cateid_list = substr( $cateid_list, 0, strlen( $cateid_list ) - 1 );
				$argument['cate_id'] = $cateid_list;
			}

			$html = load( 'biz.html' );
			$result = $html->all( $argument );

			return $result['data'];


		}
	}

?>